﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/User.master" AutoEventWireup="true"
    CodeFile="Edit.aspx.cs" Inherits="List_Edit" Title="编辑收藏分类" %>

<%@ Register Assembly="WFNetCtrl" Namespace="WFNetCtrl" TagPrefix="cc1" %>
<%@ Register Src="../WUC/CatalogTree.ascx" TagName="CatalogTree" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script src="../Scripts/selectFixer.js" type="text/javascript"></script>

    <style type="text/css">
        .filmInfo .style02 div
        {
            color: #000;
            float: left;
            width: 52em;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphLeft" runat="Server">
    <table>
        <tr>
            <td>
                收藏分类名称：
            </td>
            <td>
                <asp:TextBox ID="tbListName" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                对应栏目：
            </td>
            <td>
                <uc2:CatalogTree ID="dtMenu" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                进度 ：
            </td>
            <td>
                已添加：<asp:Label ID="lbAmount" runat="server">0</asp:Label>/总数：<asp:TextBox ID="tbTotal"
                    runat="server">100</asp:TextBox><asp:RequiredFieldValidator ID="rfvTotal" runat="server"
                        ErrorMessage="总数不能为空。" ControlToValidate="tbTotal"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="revTotal" runat="server" ControlToValidate="tbTotal"
                    Display="Dynamic" ErrorMessage="总数必须为数字。" ValidationExpression="\d" Enabled="false"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                说明 ：
            </td>
            <td>
                <asp:TextBox ID="tbListRemark" runat="server">说明</asp:TextBox><asp:RequiredFieldValidator
                    ID="rfvtbListRemark" runat="server" ErrorMessage="说明不能为空。" ControlToValidate="tbListRemark"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr id="trCreateTime" runat="server">
            <td>
                创建时间：
            </td>
            <td>
                <asp:Label ID="lbCreateTime" runat="server"></asp:Label>
            </td>
        </tr>
                <tr>
            <td colspan="2">
                <asp:Button ID="btnAdd" runat="server" Text="提交" OnClick="btnAdd_Click"></asp:Button>
            </td>
        </tr>

        <tr>
            <td colspan="2">
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="gaugehead">
                    <tr>
                        <td width="50px">
                            编号
                        </td>
                        <td width="50px">
                            排序号
                        </td>
                        <td width="30%">
                            影片名
                        </td>
                        <td width="100px">
                            IMDB编号
                        </td>
                        <td width="20%">
                            收藏时间
                        </td>
                        <td>
                            备注
                        </td>
                        <td width="140px">
                            操作
                        </td>
                    </tr>
                </table>
                <%--<div style="width: 100%; height: 400px; overflow: auto">--%>
                <asp:GridView ID="gvList" border="0" CellPadding="0" CellSpacing="0" runat="server"
                    AutoGenerateColumns="False" PageSize="15" Width="100%" CssClass="resourcesList"
                    GridLines="None" ShowHeader="False" onrowdatabound="gvList_RowDataBound" 
                    onrowcommand="gvList_RowCommand">
                    <EmptyDataTemplate>
                        <font color="red" style="font-size: large; color: red; text-decoration: underline;">
                            无符合条件的记录</font>
                    </EmptyDataTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <Columns>
                        <asp:TemplateField ItemStyle-Width="50px">
                            <ItemTemplate>
                                <%#Container.DataItemIndex+1 %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="排序号" ItemStyle-Width="50px">
                            <ItemTemplate>
                                <asp:TextBox ID="tbSortIndex" runat="server" Text='<%#Eval("SortIndex")%>' Width="50px"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="影片名" ItemStyle-Width="30%">
                            <ItemTemplate>
                                <a href="Browse.aspx?ID=<%# Eval("ID") %>" title='<%# Eval("MovieName") %>' target="_blank">
                                    <%# DataBinder.Eval(Container.DataItem, "MovieName")%></a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="IMDB编号" ItemStyle-Width="100px">
                            <ItemTemplate>
                                <asp:TextBox ID="tbIMDB" runat="server" Text='<%#Eval("IMDB_ID")%>'></asp:TextBox><asp:Label ID="Lable1" runat="server" Visible="false" ForeColor="Red">添加影片到该分类时输入影片imdb即可</asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="收藏时间" ItemStyle-Width="20%">
                            <ItemTemplate>
                                <asp:Label ID="tbCreateTime" runat="server" Text='<%#Eval("CreateTime")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="备注">
                            <ItemTemplate>
                                <asp:TextBox ID="tbRemark" runat="server" TextMode="MultiLine" Text='<%#Eval("Remark")%>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="操作" ItemStyle-Width="140px">
                            <ItemTemplate>
                                <asp:Button ID="btnEdit" runat="server" Text="保存" CommandName="btnEdit" Visible="true"
                                    CommandArgument='<%#Eval("ID")%>' />
                                <asp:Button ID="btnDel" runat="server" Text="删除" CommandName="btnDel" CommandArgument='<%#Eval("ID")%>'
                                    OnClientClick="return window.confirm('您真的要删除吗？')" />
                                <asp:Button ID="btnAdd" runat="server" Text="新增" CommandName="btnAdd" Visible="false"/>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <%--</div>--%>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <cc1:DefaultPager ID="pGrid" runat="server" Align="Right" OnClick="pGrid_OnClick">
                </cc1:DefaultPager>
            </td>
        </tr>
    </table>
</asp:Content>
